package com.richmond.gui.bilan;

import com.richmond.data.bilan.BilanRecord;
import javafx.scene.control.TableCell;
import javafx.scene.control.TableColumn;
import javafx.util.Callback;

public class TotalMoneyFormatCellFactory implements Callback<TableColumn<BilanRecord, Double>, TableCell<BilanRecord, Double>> {
    public TotalMoneyFormatCellFactory() {
    }

    @Override
    public TableCell<BilanRecord, Double> call(TableColumn<BilanRecord, Double> bilanRecordDoubleTableColumn) {
        MoneyFormatCell moneyFormatCell = new MoneyFormatCell();
        if (!moneyFormatCell.getStyleClass().contains("total")) {
            moneyFormatCell.getStyleClass().add("total");
        }
        return moneyFormatCell;
    }
}